<style>
/* 重写样式 */
.fui-header.block {
    display: block;
}

.fui-tab {
    margin: 0;
}

.fui-tab a {
    height: 2.2rem;
    line-height: 2.2rem;
}

.fui-tab:after {
    display: none;
}
.nickname {
    color: #50b6fe;
}
    .shop-index-page .menu {height: auto; background: #fff;}
    .shop-index-page .menu .item {height: auto; width: 1%; padding: 0.5rem 0; margin: 0; font-size: 0.7rem; color: #636363; text-align: center; display: table-cell;position: relative;}
    .shop-index-page .menu .item:after  {font-size: 0.7rem;position: absolute;content: '';left:-1px;top:0.5rem;bottom:0.5rem;border-left:1px solid #d9d9d9;}
    .content-empty{padding:1rem 0;margin:0;}
source{
    min-width: 100%;
    min-height: 100%;
    height: auto;
    width: auto;
}
</style>
<style>
	.btn{border-radius: 100%;border: 0 solid #ebebeb;margin: 0.25rem;}
	.btn-logo.active{border: 2px solid #3263fe;}
	.btn-logo {
			padding:0px;
			height:2rem;
			width:2rem;
			border-radius: 100%;
			border: 2px solid #ebebeb;
	}
	.label-gray{
		background-color:#f2f2f2;
		color:#333;
		border-radius:1rem;
		padding:0.3rem;
		font-size:0.7rem
	}
	.label-gray.active{
		background-color:#e8fcf8;
		color:#18bc9c;
	}
.btn.btn-success{background:#F5F0FF}
.btn.btn-success, .jy-btn1{border-radius:1rem;background:linear-gradient(95.84deg, #EDF6FF 5.59%, #F0F3FF 51.42%, #F5F0FF 97.24%)}
.btn.btn-blue, .jy-btn2{border-radius:1rem;background:linear-gradient(136deg, #7783EA, #4e6ef2, #7274f9, #9f66ff)}
.jy-topbg{background:linear-gradient(to bottom, #f8dfd8, #F5F0FF, #F0F3FF, #f7f7f7)}
</style>
<div class='fui-page fui-page-current'>
	<div class="fui-content">
	<div class="jy-topbg" style="top:0;">
	<div class="jy-content">
	<div class="fui-cell-title c" ng-click="image(pagedata.post,'logo')" style="padding-top:1rem;padding-bottom:0">
		<div class="radius" style="border-radius: 100%;width: 6rem;height:6rem;margin: 0 auto;background-image:url({{tomedia(pagedata.post.logo) || '../addons/jy_aiagent/resource/images/nv1.png'}});color:#7783EA;background-position: center;background-repeat: no-repeat;background-size: cover;">
		</div>
		<div style="margin-top: -1rem;">
			<i class="icon icon-tianjia bold" style="border-radius: 100%;padding:0.3rem;width:1.6rem;height:1.6rem;line-height:1.5rem;background:#7783EA;border: 2px solid  #f2f2f2;font-size: 0.9rem;color:#fff;"></i>
		</div>
	</div>
	<div class="radius" style="padding-bottom:1rem;">
	<div class="fui-cell-group radius">
		<div class="fui-cell">
			<div class="fui-cell-label bold">名称</div>
			<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="设置名称" ng-model="pagedata.post.title"/></div>
		</div>
		<div class="fui-cell">
			<div class="fui-cell-label bold">助手名</div>
			<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="设置助手名" ng-model="pagedata.post.ainame"/></div>
		</div>
		<div class="fui-cell">
			<div class="fui-cell-label bold">主人名</div>
			<div class="fui-cell-info"><input type="text" class='fui-input' placeholder="设置主人名" ng-model="pagedata.post.user_name"/></div>
		</div>
	</div>
	<div class="fui-cell-group radius">
		<div class="fui-cell">
			<div class="fui-cell-info">
				<div class="bold" style="padding-bottom: 0.3rem;">设定描述</div>
				<textarea style="height: 6rem" id="desc" ng-model="pagedata.post.desc" placeholder="实例:你是一个经验丰富的幼师，帮助解答各种疑惑问题，及培养孩子各种兴趣。"></textarea>
				<div class="fui-cell-info" style="color:#7783EA;font-size:0.6rem">
					<span ng-click="pagedata.post.desc=pagedata.demo.desc">重置默认描述 <i class="icon icon-refresh" style="font-size:0.6rem;"></i></span>
					<div ng-click="pagedata.post.desc='';" class="btn btn-sm btn-orange r-f" style="background: #7783EA;color:#fff;line-height:1.8">点击清空文本</div>
				</div>
			</div>
		</div>
	</div>
	<div class="fui-cell-group radius">
		<div class="fui-cell">
			<div class="fui-cell-label bold">音色/语言</div>
			<div class="fui-cell-info"></div>
			<div class="fui-cell-remark" ng-click="pagedata.showvoices=true;">
				{{pagedata.post.voicetitle}}/{{pagedata.post.languagetitle}}
			</div>
		</div>
		<div class="fui-cell">
			<div class="fui-cell-label bold">模型</div>
			<div class="fui-cell-info"></div>
			<div class="fui-cell-remark">
				<select class="weui_select" style="padding:0.3rem;width:8rem" name="llm_model" ng-model="pagedata.post.llm_model">
                    <option ng-repeat="(key,title) in pagedata.llm_models" value="{{key}}">{{title}}</option>
				</select>
			</div>
		</div>
	</div>
	<div class="fui-cellone" style="padding-top: 0;margin-top:1rem">
			<div wx:if="{{pagedata.post.status==1}}" class="fui-cellone-text" style="padding-right:0.5rem">
				<div class="radius c jy-btn1" ng-click="pagedata.delagent();" style="border-radius:1rem;color:red;padding:0.7rem">
					删除
				</div>
			</div>	
			<div class="fui-cellone-text">
				<div class="radius c jy-btn2" ng-click="post_json('/editagent/post/',pagedata.post);" style="border-radius:1rem;color:#fff;padding:0.7rem">
					保存
				</div>
			</div>
	</div>
	</div>
	</div>
	</div>
	<div ng-include="sys_html('common/_copyright',true)"></div>
</div>
</div>
<div ng-include="sys_html('common/_voices')"></div>
<div ng-include="sys_html('common/_footer')"></div>
<script>
scope.pagedata.delagent=function(id){
	scope.confirm({
		'message':'确认要删除智能体吗？删除后将无法找回！',
		'success':function(){
			scope.post_json('jy_aiagent/index/deluseragent/',{'id':scope.pagedata.post.id});
		},
		'fail':function(){}
	});
}
</script>